import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
      home: Scaffold(
          body: Container(
              width: 400,
              height: 400,
              decoration: BoxDecoration(
                border: Border.all(width: 10, color: Colors.black),
                color: Colors.red,
              ),
              alignment: Alignment.center,
              child: Container(
                width: 200,
                height: 200,
                color: Colors.blue,
                alignment: Alignment.center,
                child:
                    const Text('《春宵》 苏轼 \n 春宵一刻值千金，花有清香月有阴。\n 歌管楼台声细细，秋千院落夜沉沉。',
                        style: TextStyle(
                          fontSize: 10,
                          color: Colors.white,
                        ),
                        textAlign: TextAlign.center,
                        maxLines: 3,
                        overflow: TextOverflow.ellipsis),
              )))));
}

// class LifeCycle extends StatefulWidget {
//   const LifeCycle({Key? key}) : super(key: key);

//   @override
//   _LifeCycleState createState() {
//     debugPrint('createState');
//     return _LifeCycleState();
//   }
// }

// class _LifeCycleState extends State<LifeCycle> {
//   int count = 0;

//   @override
//   Widget build(BuildContext context) {
//     return Column(children: [
//       ElevatedButton(
//           onPressed: () {
//             setState(() {
//               count--;
//             });
//           },
//           child: const Text('-')),
//       Text('$count'),
//       ElevatedButton(
//           onPressed: () {
//             setState(() {
//               count++;
//             });
//           },
//           child: const Text('+'))
//     ]);
//   }
// }


// Container
